package com.rerun.service;

import java.util.List;

import com.baomidou.mybatisplus.service.IService;
import com.rerun.entity.vo.TreeMenuAllowAccess;
import com.rerun.entity.SysMenu;
import com.rerun.entity.vo.TreeMenu;

/**
 * SysMenu 表数据服务层接口
 */
public interface ISysMenuService extends IService<SysMenu> {

    /**
     * 获取指定用户拥有的菜单
     *
     * @param uid the uid
     * @return the list
     */
    List<String> selectMenuIdsByuserId(String uid);

    /**
     * 获取指定用户的菜单
     *
     * @param menuIds 当前用户所在角色拥有的权限ID集合
     * @param pid     菜单父ID
     * @return the list
     */
    List<TreeMenu> selectTreeMenuByMenuIdsAndPid(List<String> menuIds, String pid);

    /**
     * 获取当前用户的菜单
     *
     * @param uid the uid
     * @return the list
     */
    List<TreeMenu> selectTreeMenuByUserId(String uid);

    /**
     * 获取指定用户拥有权限
     *
     * @param menuIds 该角色拥有的权限ID集合
     * @param pid     菜单父ID
     * @return the list
     */
    List<TreeMenuAllowAccess> selectTreeMenuAllowAccessByMenuIdsAndPid(List<String> menuIds, String pid);

}